#!usr/bin/env python  
# -*- coding:utf-8 -*-
import xadmin
from .models import CityDict,CourseOrg,Teacher

class CityDictAdmin(object):
    list_display = ['name', 'desc', 'add_time']
    search_fields = ['name', 'desc']
    list_filter = ['name', 'desc', 'add_time']
xadmin.site.register(CityDict, CityDictAdmin)

class CourseOrgAdmin(object):
    list_display = ['name', 'desc', 'click_nums','fav_num','image','address','add_time','city']
    search_fields = ['name', 'desc','city']
    list_filter = ['name','address','add_time','city']
xadmin.site.register(CourseOrg,CourseOrgAdmin)

class TeacherAdmin(object):
    list_display = ['name', 'work_years', 'work_company','work_position','points','click_num','fav_num','add_time','org']
    search_fields = ['name', 'work_years', 'work_company','work_position']
    list_filter = ['name', 'work_years', 'work_company','work_position','org']
xadmin.site.register(Teacher,TeacherAdmin)